﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Default.Master" AutoEventWireup="true" CodeBehind="ChargeRequest.aspx.cs" Inherits="App.ChargeRequest" Theme="Alpha" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:Panel ID="Panel1" runat="server">
        <h1>Nahlásit změnu kreditu</h1>
        <div class="formSelect">
            <asp:Label ID="Label10" runat="server" Text="Pro tým: "></asp:Label>
            <asp:DropDownList ID="DropDownListTeam" runat="server">
            </asp:DropDownList>
        </div>
        <div class="formField">
            <asp:Label ID="Label2" runat="server" Text="Částka: (Kč)"></asp:Label>
            <asp:TextBox ID="TextBoxChargeRequest" runat="server" MaxLength="7" ValidationGroup="ChargeValidation"></asp:TextBox>
        </div>
        <asp:RequiredFieldValidator ID="RequiredFieldValidator" runat="server" ControlToValidate="TextBoxChargeRequest" ErrorMessage="Není uvedena částka." ValidationGroup="ChargeValidation"/>
        <div class="formButton">
            <asp:Button ID="ButtonConfirm" runat="server" Text="Odeslat požadavek" onclick="ButtonConfirm_Click" ValidationGroup="ChargeValidation"/>
        </div>
        <ajaxToolkit:FilteredTextBoxExtender ID="FilteredTextBoxExtender" runat="server" TargetControlID="TextBoxChargeRequest" FilterType="Custom" ValidChars="0123456789"/>
        <asp:Repeater ID="RepeaterChargeRequests" runat="server">
            <HeaderTemplate>
                <h1 style="margin-top: 35px;">Požadavky čekající na vyřízení</h1>
            </HeaderTemplate>
            <ItemTemplate>
                <div class="detailTeam">
                    <ajaxToolkit:Gravatar ID="ImageAvatar3" runat="server" DefaultImageBehavior="Identicon" Email="<%#GetTeamID(Container.DataItem)%>" DefaultImage="<%#GetTeamAvatar(Container.DataItem)%>" CssClass="detailTeamAvatar"/>
                    <div class="detailRequest creditRequest">
                        <span class="nick">
                            <asp:LinkButton ID="LinkButtonTeam" runat="server" Text='<%#GetTeamName(Container.DataItem)%>' CommandArgument='<%#Eval("TeamID")%>' OnClick="LinkButtonTeamDetail_Click"/>
                        </span>
                        <span class="ammount"><%#Eval("ChargeRequest") %> Kč</span>
                        <span class="actions">
                            <asp:LinkButton ID="LinkButtonCancel" runat="server" CommandArgument='<%#Eval("ChargeID")%>' OnClick="LinkButtonCancel_Click">zrušit požadavek</asp:LinkButton>
                        </span>
                    </div>
                </div>
            </ItemTemplate>
        </asp:Repeater>
    </asp:Panel>
</asp:Content>
